import { ApiProperty } from "@nestjs/swagger";
import { Transform } from "class-transformer";
import { IsOptional, IsString, IsInt, Min, Max } from "class-validator";
import { BaseQueryDto } from "../base.dto";

export class UploadFileDto {
    @ApiProperty({ description: "自定义保存路径" })
    @IsString()
    @IsOptional()
    dir: string;
}

export class UploadHistoryRemoveDto {
    @ApiProperty({ description: "数据库id" })
    @IsInt()
    @Transform(({ value }) => parseInt(value))
    id: number;
}

export class UploadHistoryQueryDto extends BaseQueryDto {}
